{{define "console/reg/index.html"}}
{{ template "console/common/header.html" .}}
<div id="app" class="login-box">
    <el-form :model="ruleForm" :rules="rules" ref="ruleForm" class="demo-ruleForm">
        <el-row>
            <el-col :span="8">

                <el-form-item prop="Username">
                    <el-input placeholder="请输入账号" v-model="ruleForm.Username">
                        <template slot="prepend">账号</template>
                    </el-input>
                </el-form-item>

            </el-col>
        </el-row>
        <el-row>
            <el-col :span="8">

                    <el-form-item prop="Password">
                        <el-input type="password" placeholder="请输入密码" v-model="ruleForm.Password">
                            <template slot="prepend">密码</template>
                        </el-input>
                    </el-form-item>

            </el-col>
        </el-row>
        <el-row>
            <el-col :span="8">

                <el-form-item prop="Code">
                    <el-input placeholder="验证码" v-model="ruleForm.Code">
                        <template slot="append"><img @click="captcha('ruleForm')" id="captcha" height="30px" :src="img" :data-id="key" ref="key"></template>
                    </el-input>

                </el-form-item>
            </el-col>
        </el-row>
        <el-row>
            <el-col :span="8">
                <el-form-item style="text-align: center">
                    <el-button type="primary" @click="submitForm('ruleForm',key)">注册</el-button>
                </el-form-item>
            </el-col>
        </el-row>
    </el-form>
</div>
{{ template "console/common/footer.html" .}}
<script>
    var origin_captcha = {{ .captcha }}
    var origin_key = {{ .idkey }}
</script>
<script src="/static/js/reg.js"></script>
{{end}}